package edu.nf.supermarket.consts;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author yjj
 * @date 2025-05-21
 */
@Getter

public enum AlipayConfigEnum {
    /**
     * 用于封装支付宝 SDK 所需的所有配置信息。（单例实例）
     */
    INSTANCE("https://openapi-sandbox.dl.alipaydev.com/gateway.do", // 网关地址
            "2021000148694802",                       // AppID
            // 商户私钥
            "MIIEwAIBADANBgkqhkiG9w0BAQEFAASCBKowggSmAgEAAoIBAQDOAf2qwqdqhPLyZN6osj4qK8+5bziFYhOn4iKBuTNqcjioKXJSCbCdUT6cvNNYfX0JXTM0MkS/8sizVOIoJ+3JAIho2PYIDn2G0N6FEp5EJ5DhGClhWMpIGPp/wzbBrb0t/z2dDAgbsv1Bqi/DeSrHEuE/9ooYmnEd5ktR2bchiPG9W0XJEKzsS5JsOmAnufomb7nPp8TDYRsbaUKF/gXySu9xja7kNXa82S35nMHYnzh20zUPNvBCHWplXlVHKH8h4PxJDXTIK3pKZp3/UJ/IAeA+O2JOHAsDeZV/+3SklpwuV91xbndx6BZHDnB0xmW5OISzm/N3BcvZYRrIvJCRAgMBAAECggEBAM1jdsEVKU0uF/pLTyLp8sigvY2nsbZqPiaXcsfbGcP69TnTeMMKHif6pG4oZJ5JHqyDW1Wi+KBXMnp5GrHmfVB1U4sVJNaLe+M5w2DxWxGgUPXa3QbNO3/+R2GyA5m92mtNmuRE5qCXJ6CcSNqep2OrEyBucOhusnCY9mc4pTisQGhN0vNeEqL0GwFGP9LjoLRqeSrnpqbk4G0YDWhpCrqDJpHOQNSL41cq2sLGttEy3jEsZCYMHz9Ncs1bFoME/kFjna5u6YTXShejmn/km+mGwnX/a7WneZu6UwSOW3TH1KCbcGMTO+tJJhyX7eDrdsajnMekEYDjUNK7c8WscAECgYEA+3s3acJa1/PnIQ5yudP/GMjkmpO83DEj9F1B79Db3zKAHMS+iNI040vvqFDc8VDtEjMdItNoWkuQGIBE4SbT+KhOMQf3WVASwhJy3elfO5/dFufnPPB6XiTgI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6BwdKSo4oC4jjmyNojlmSQfARUiV5G5NyKN9U9+PA8H9XHNvDi++RSTj1AgGCIJ5gLsw0dyQIDAQAB", "UTF-8",                                    // 字符编码
            "RSA2",                                     // 签名类
            "http://48209f74.r31.cpolar.top/alipay/notify",         // 异步通知地
            "http://48209f74.r31.cpolar.top/alipay/return"          // 同步回调地址
    );
    private final String gatewayHost;
    private final String appId;
    private final String merchantPrivateKey;
    private final String alipayPublicKey;
    private final String charset;
    private final String signType;
    private final String notifyUrl;
    private final String returnUrl;

    AlipayConfigEnum(String gatewayHost, String appId, String merchantPrivateKey, String alipayPublicKey, String charset, String signType, String notifyUrl, String returnUrl) {
        this.gatewayHost = gatewayHost;
        this.appId = appId;
        this.merchantPrivateKey = merchantPrivateKey;
        this.alipayPublicKey = alipayPublicKey;
        this.charset = charset;
        this.signType = signType;
        this.notifyUrl = notifyUrl;
        this.returnUrl = returnUrl;
    }

    public static AlipayConfigEnum getInstance() {
        return INSTANCE;
    }
}
